package api

import (
	"github.com/gin-gonic/gin"
	"week_exam_2_3/api/handler"
	"week_exam_2_3/api/moddlewere"
)

func Run(router *gin.Engine) {
	router.POST("/login", handler.Login)
	OnLine := router.Group("/")
	OnLine.Use(moddlewere.OnLine)
	{
		OnLine.POST("/friend/add", handler.FriendAdd)
		OnLine.POST("/friend/List", handler.FriendList)
		OnLine.POST("/friend/Find", handler.FriendFind)
		OnLine.GET("/chat", handler.Chat)
	}
}
